Repository navigation
Bring in upstream LearnHarness 0.7.0 - #322
Conversation
The teacher can now annotate a figure that lives inside one of the
learner's PDFs (a diagram on a lecture slide, a plot in a paper) without
the learner screenshotting it first.
- visual gains an optional `pdf: { path, page }` beside `image` (never
both). Dispatch checks the path against File access, that pdfjs opens
the file, and that the page exists; a bad PDF or page fails the call
before any job exists.
- At job start the page is re-checked and rendered natively (~1600px).
The visual-maker sees the page and calls a new PDF-only `crop_page`
tool with a box in page-image pixels. The crop is re-rendered from the
PDF (fitLongSide 1600, at most 300 dpi), shown back, and becomes the
picture it annotates through the existing placeholder pipeline.
Re-cropping discards the SVG; a figure that fills the page may be
annotated whole; a figure that is not on the page fails with notes.
- Only the final crop is stored as a session snapshot. VisualResult.image
records the page and crop (page fractions) for provenance.
- renderPdfPages takes an optional crop and fitLongSide; existing callers
are unchanged. learner-image.ts exports learnerImageFromBytes so PDF
renders share the photo normalization and snapshot identity.
- Teacher prompt 55-images.md, README and docs updated.
Lockfile-only npm audit fix (zod, puppeteer-core/chromium-bidi, dompurify, undici, fast-uri, source-map-js and their trees), resolved with a 14-day release cooldown (--before=2026-10-24). Remove the unused ansi-to-react (the only path to vulnerable linkify-it) and react-jsx-parser; neither is imported anywhere.
- lh:update-install now uses the same trusted-window/main-frame sender check as lh:update:get and lh:update:check; untrusted requests are dropped and logged. - externalCliEnv strips LH_DESKTOP_API_SECRET and LH_DESKTOP_SERVER, as the browser-service helper's spawn env already does. - The ChatGPT credential reader refuses symlinks and, outside Windows, files readable by group/other or owned by another user, matching subscription-store.cjs.
…notation-agent-cfdc72 # Conflicts: # src/agent/subagents/visual-maker.ts
# Conflicts: # package-lock.json # package.json
# Conflicts: # tests/automatic-updates.test.ts
Side questions on OpenCode Go fail before any token is used:
400 {"type":"MissingSessionID","message":"Request is missing
x-opencode-session and cannot be routed efficiently."}
pi-ai adds that header only when the request carries a session id, and
streamSideAnswer deliberately left it out to keep Claude Code from
resuming the lesson's live CLI process. That reason only applies to
Claude Code: every HTTP provider now gets the chat id, so OpenCode Go can
route the side question and keep its prompt cache warm.
Regression coverage lives in tests/session-identity.test.ts: both
OpenCode Go transports carry x-opencode-session, and a Claude Code side
question still sends no session id.
The unit test covers the stream options; this one drives the real side-chat service and records what reaches the engine, so a future refactor that drops the chat id from streamSideAnswer fails here instead of at the provider.
React's development server renderer seals each useRef object (Object.seal). Chat assigned `changed` onto one ref after creating it, and DockOverlay assigned it onto three more, so every chat page threw "Cannot add property changed, object is not extensible" under next dev. Production builds skip the seal, which hid the bug. The readers are now plain objects made once with useState, with `changed` included from the start. DockOverlay's readers forward `changed` to the latest parent reader, the same callback the old per-render assignment set. tests/chat-dev-render.test.tsx renders the chat with React's development server renderer. It failed with the same error before this change.
plan-block.tsx held three things in 984 lines: layout math, edge geometry and three React views. The layout math (character-class width estimate, 28-letter wrap, dagre placement, edge paths) now lives in components/plan-layout.ts, unchanged. HEAD_H and HEAD_W become exports so the arrow markers keep using them. No behavior change. The existing plan tests pass with only their import paths changed.
Plan boxes got their width from one per-letter chart fitted to Source Sans 3, and lines broke after 28 letters, while the labels drew in whatever reading font Appearance picked. JetBrains Mono labels came out 40-55% wider than the chart said: 13 of 14 boxes in the test session spilled past their borders, and side-by-side labels ran into each other. Chinese and Japanese titles spilled with the default font too. blockLayout() now takes the measurer as its third argument. The measurer answers line breaks, line widths and font size, and usePlanLayout() asks the browser for all three, inside the diagram's own svg: - Line breaks: one hidden HTML block, capped at 12.75 em, where the browser breaks each title by its own Unicode rules. Words never split and never hyphenate; any word wider than the cap widens its box. Korean titles use word-break: keep-all, since Korean separates words with spaces. - Widths: one hidden SVG <text> at the heaviest weight any label uses. Line height and vertical centering come from the measured font size. The server and the first client render still lay out with the old chart, now only as stand-in measurer that wraps at spaces, so server HTML and hydration match. One ResizeObserver on fixed sample text re-measures when the label font changes size: web font loads, font picks in Settings, size changes. The popup now computes its layout once and shares it with the diagram.
Unit tests feed fake widths and line breaks to the layout, so only real browsers catch labels spilling out of their boxes or lines breaking in the wrong places. scripts/smoke-plan-labels.mjs runs next start on the production build with throwaway copies of the test data, plus two seeded chats: one whose 14-node plan has hard titles (Chinese, Japanese, Korean, Arabic, emoji, long words, wide capitals) and one that ends on one unanswered question, so the dock shows the plan beside it. For every label line it checks rendered width <= box width minus 16px padding per side, and that the text stays inside the box vertically. Per node it checks that the lines keep the whole title, split no word and start no line with closing punctuation. It covers 8 fonts x 4 label sizes on both plans, the popup, the dock plan, one live Settings switch to JetBrains Mono with no reload, and cold loads in that font with zero hydration errors. The app has no label size setting, so the script forces sizes with one injected CSS rule and checks they applied. CI runs it in the standalone job right after npm run build, on macOS, Windows and Linux. On this branch: 74 of 74 checks pass. On cb25c8e (before the fix): 64 of 74 fail.
wrapRegionLabel() split words too long for one line by single UTF-16 units, and trimmed its ellipsis the same way, so emoji broke into halves. wrapLabel() split node labels by code point, which cuts flags and ZWJ sequences. On the graph home, one session named with emoji showed its family emoji split across two lines, and on Windows one node label made of flags broke "CA" into "C" and "A". Both now split between graphemes (Intl.Segmenter): emoji, flags and accented letters stay whole. Nothing else about wrapping changes. The new wrapRegionLabel test failed on the old code: its lines held lone surrogate halves.
The in-chat plan and the dock plan scale up to fill their column, capped by TEXT_CAP_SCALE = 16 / 12.5 so labels never grow past the 16px prose size. That ratio assumed 12.5px labels, but --text-xs is 11px, so the cap stopped labels at 14.08px. It also ignored the reading size picked in Settings. PlanDiagram now takes textCap, the largest on-screen label size in px, and divides it by the label size the layout measured. Both callers pass Appearance's proseFontSize. On one 2-node test plan, labels now reach 16px at the default reading size and 20px at reading size 20 (14.08px both times before).
…notation-agent-cfdc72
The stop button was centered on the whole card, so expanding a card moved it down onto the Cost row. Position it against the face row only. The expanded view no longer repeats the title the face already shows. It keeps the activity line, which wraps there instead of being cut off. The face title gets a title= tooltip like the activity line, so a long title stays readable. Fixes amosblomqvist#450.
visibleStrokes replayed the whole eraser history, segment by segment, on every call (three times per pen lift plus every repaint). It is now: - memoised per history array (WeakMap, keyed by identity); - incremental when the history is the previous one plus one stroke: a pen stroke appends, an eraser filters the previous result and returns the same array object when it touches nothing; - prefiltered per pen/eraser pair by bounding boxes (pen bounds incl. each segment's half width, cached per committed stroke; eraser raw point bounds, never cached), inflated by the 12px contact radius, so only true misses are rejected and results are identical. Also adds strokeBounds/liveBounds and visibleUnderEraser (live eraser, never cached). The return type becomes readonly Stroke[]; no caller mutates it. Until the sheet stops doing so (repaint work), render still resolves [...draft.strokes, active]. That stays correct: eraser bounds are never cached, and the active pen is always the last entry, so its bounds are never measured while it grows. Tests: an oracle copy of the previous resolver checked against 200 seeded random histories (fresh, built one stroke at a time, undo, repeated), the 13/14px boundary diagonally and at full pressure, identity of no-op eraser results, live erasers against 100 random cases, bounds, and that the input array is never returned.
…tion
Every Sheets publish called ctx.refreshActions() and refreshSubmissions()
(two host re-renders) and the Draw label/hasPendingInput then serialised
every visible point with JSON.stringify. This fired per stroke, per tool
change and per pan pointermove.
- inkSignature identifies visible strokes by a per-stroke id
instead of their points. Committed strokes are never mutated or rebuilt,
so draw-then-undo still matches; an erased stroke redrawn with identical
coordinates now counts as changed.
- Sheets.publish takes a reason ("sheet" | "ink" | "camera" | "tool");
the constructor callback and onChange listeners receive it.
- The host callback ignores camera/tool changes and refreshes the host only
when what it reads changes: per session pending, has draft, has strokes,
and seenPoses.size (hasPendingInput checks seenPoses for practice problem
targets, and a backfilled pose can be recorded without a publish; the
size term lets it reach the host with the next stroke, as before). The stale-palette check runs on "sheet" changes only.
Host reads were audited: action.name and hasPendingInput are read on host
render; the undo/toggle/hand predicates are evaluated at invocation only.
Tests: publish reasons, pending/signature semantics (undo to the sent
drawing, missed eraser, color change), and frontend refresh counts with
the real Sheets (first stroke 1, strokes 2-20 0, pans and tool switches 0,
undo to empty 1; practice send/next stroke/undo-to-sent 1 each; a silent
pose backfill reaches the host with the next stroke).
Pen down and pen lift each repainted the whole sheet (twice on lift), the eraser repainted on every pointermove, and every pan move repainted synchronously. The sheet now tracks what the canvas shows and brings it up to date with the least painting: - render() is split into renderChrome() (toolbar, buttons, cursor, status; button props are memoised per handle), layout() (reference image, bitmap size) and syncInk(). render() still runs all three. - syncInk() compares the target (visible committed strokes, minus any under a live eraser) with what was painted for this draft, color, origin and bitmap size: nothing when equal, only appended strokes when the target extends it (the just-committed live stroke is already drawn), otherwise one full repaint that re-strokes a live pen stroke on top. Same paintSegment calls, order and transform as a full repaint. - Pen down paints its first dot directly; a mouse pointerup paints the final segment it adds; the commit then draws nothing. - Eraser and pan moves schedule at most one layout + ink sync per animation frame (reference image and ink move in the same frame). Discrete events (pointerup, undo, clear, tool change, sheet changes, resize, dispose) apply a pending frame synchronously. - Pointer geometry is measured once per gesture (and after layout or pan changes); the 2D context is obtained once (attributes unchanged here). - Full repaints skip strokes whose bounds lie outside the viewport; export never culls. paintStrokes() takes resolved strokes; paintInk() keeps its signature for capture.ts. Tests: new browser groups count full repaints via clearRect: 20 pen strokes, a pressure-varying pen stroke and a dot cause none and equal a forced full repaint pixel for pixel; eraser sweeps repaint nothing over empty space and at most once per frame across ink; a 60-move pan repaints at most once per frame with ink and reference at the same offset after every frame; Undo, theme change, resize and Clear equal a full repaint; culled ink returns exactly and is still exported. Changed wait in an existing test: "zero-pressure hover and held/released stylus eraser" now awaits one animation frame after the held-eraser pointermove before reading the canvas (live eraser previews repaint per frame).
Pressing and holding the eraser over a stroke left the stroke visible until the eraser moved or lifted. start() synced the canvas before it created the eraser stroke and then painted only pen input. It now syncs the ink after it creates an eraser stroke, as render() did before. Test: a browser group holds the eraser still over a fresh stroke and expects it gone after two animation frames, still gone on release, and restored then removed by two Undos.
Brings upstream main at 0.7.0 (117 commits) with a real merge, so later syncs merge cleanly. Conflicts resolved to keep every fork feature (the T3 update flow, the desktop server list, the phone app, plugins, auth) and take upstream elsewhere; where both changed the same behaviour, the fork's is kept with upstream's intent folded in: - electron: the fork's invoke-style lh:update-install keeps its sender check (upstream's hardening intent is already there); upstream's test of it is ported to that channel. Upstream's startup announcement module comes in unwired (the fork's local window first shows the ghost page). - plan layout: the shared layout stays in src/core/plan-layout.ts for the phone, upgraded to upstream's measured labels; components/plan-layout.ts re-exports it; the plan golden is recorded again. - PDF figures: upstream's new pdf-figure.ts resolves paths through the fork's learner-file, so uploaded attachments work there too. - package-lock.json regenerated with npm install (Next.js 16.4.6). - client protocol: upstream's optional question optionOrder is additive, so it gets a capability (question-option-order-v1), no version bump. - Anthropic message threads stay off for direct auth (upstream's fix); the fork's test that expected them is updated. Verified: checks
|
Preview ready for lh preview 322It runs beside your server on port 3775 with fresh, empty data, and Ctrl+C stops it and deletes it. Release files. Each push builds a new one. |
…etired models - smoke-plan-labels signs in with a session in the server's own store (no localhost bypass), as smoke-server does. - A folder Delete removes its sessions' uploads, holds each session's reads while in flight, and leaves an open deleted session with a replace after dropping its view. - Anthropic message threads stay on for direct auth; the thread's session id carries a hash of the credential, so a rotated key starts a new thread. - A model refresh never imports a retired model, and pricing reads the retirement table first. Verified: checks
Round 1 fixes (eab07a2)Each fix has a test that fails on 48dc216 (checked by swapping the old files back) and passes now, except the CI smoke, which has no unit test. Important
Nit
PR body: says CI was red at 48dc216 and why. It updates judgment calls 11 (the folder Delete) and 13 (threads), and adds the retired-model refresh to call 14. Checks
|
… models - Anthropic threads: the credential is resolved once and that exact key and those credential headers are what the request sends, so a key rotated or refreshed between the fingerprint and the send can't land on the old key's thread. The fingerprint covers a per-request x-api-key (or other credential header) override. - Session stats read: readStats holds while this window deletes the session, like the record and stream reads, so a turn ending during a single or folder Delete no longer 404s on ?view=stats. - Retired models: a pi.dev refresh imports any id the feed lists, so a model the provider still serves runs again. Pricing is catalog-first, with the retirement table only when no catalog has the id (the fork's design before the merge). Comments say what is true now. - Folder Delete that fails partway: the server re-checks which session records are gone and reports them, the dialog keeps their reads held, and the sidebar leaves the open session if it went. - session-deletion.ts: each doc comment sits above its own function. Verified: checks
Round 2 fixes (31e28af)Each fix has a test that fails on eab07a2 (checked by swapping eab07a2's files back) and passes now. Important
Nits
PR body: judgment call 11 adds the stats hold and the partial Delete, 13 the single credential resolution and header override, and 14 the refresh importing listed ids with catalog-first pricing. Checks
|
Brings main's phone math fix (#318, apps/mobile only) into the 0.7.0 sync. No conflicts. Verified: checks
|
prove-learnharness: BROKEN for 83ca438 Two regressions reproduced against main. The first signed-in visit to /chat/new returns 500 on the PR and 200 on main. Axe also reports a serious invalid ARIA label on the sidebar root drop target. Couldn't prove the native older phone, full paired-desktop update flow, automatic self-hosted download, or a clean local pass of the upstream plan-label smoke. The receipt records the narrower checks and their results. Observations
Verification receiptReceipt for PR #322Verdict: BROKEN Answer keys
Observations
Retries and limits
|
One conflict, components/answered-card.tsx: main's #326 reads the confidence through shownConfidence(); the sync keeps upstream's imports (lettered options, question layout) and its centered 4ch percentage, now showing main's value. Verified: checks
…op label
- First signed-in visit 500 ("Cannot access 'R' before initialization"
in SettingsDialogProvider). The merge added a runtime import cycle:
the settings dialog's new prompt editor (agent-section, prompt-segment-
dialog, prompt-text) reaches host-markdown and the chat, which reach the
sidebar, which mounts the dialog. Through the plugin host's async
modules, the production server bundle could render the provider before
its module had initialized. Upstream 069a6a1 has the same edges but
serves 200; main lacks the prompt editor.
The settings dialog and the sidebar are now on no import cycle:
useSettingsDialog lives in settings-dialog-context.ts (dictation, plugin
views and the shortcuts import it there), SidebarToggle and useSidebar
in sidebar-toggle.tsx (top-bar, home, new session), and timeAgo in
time-ago.ts (extraction coverage). sidebar.tsx and settings-dialog.tsx
re-export what they moved.
- The sidebar's root drop space had aria-label on a plain div, which ARIA
prohibits (axe aria-prohibited-attr, serious; upstream has it too). It
is now SidebarRootDrop, a pointer-only drop target with no name.
Verified: checks
Verify fixes (a216139)First, origin/main (#326, #330, #331) is merged in at 66842cc with a real merge. The one conflict, 1. First signed-in visit 500
2.
Checks
PR body: judgment calls 16 (import cycles) and 17 (the drop space) are added. |
|
prove-learnharness: BROKEN for a216139 Both fixes from the first report passed. The folder flow still has a keyboard blocker. Shift+F10 opens the session menu, but it has no move action and the root drop target cannot take focus. Couldn't prove the maintained web plan as written because its answer selector includes the option letter. Packaged Electron was skipped because its recipe overlaps an app build and two server instances. Phone math ran through unit tests. Observations
Verification receiptReceipt for PR #322Verdict: BROKEN What the change touches and answer keys
Steps and break-it probes
Retries and limits
|
One conflict, components/chat.tsx: upstream 0.7.0 fixed the same two render-time writes onto sealed refs the same way (stable objects made once with useState, `changed` forwarding through a ref to the latest reader). Upstream's version is kept at both sites, so this branch now adds only its server-render regression test (tests/chat-server-render). Verified: checks
…333) (#336) Adds `tests/chat-server-render.test.tsx`, which renders Chat with `react-dom/server` in React's dev build for empty teach and practice sessions and the file-path smoke's teaching, probe and practice fixtures. It catches render-time property writes onto `useRef` objects, which React's dev server render seals. That bug made direct session-page loads return 500 in `next dev` (#333). The upstream 0.7.0 sync (#322) had already fixed both write sites in `components/chat.tsx` the same way this PR did, so after merging main only the regression test remains. - **Old code:** with either old write restored, all five session renders fail with "object is not extensible". - **Merged code:** a direct `curl` of seeded teaching, probe and practice pages in `next dev` returns 200. Closes #333. Verified: checks, /code-review, codex (both reviews clean), live next dev check (200 on all three session pages)
Brings #321 up to date with main (upstream 0.7.0 through #322, and the #333 sealed-ref fix through #336), so a direct lesson load in next dev answers 200 on this branch too. No conflicts; main changed none of the files #321's rules live in (proxy.ts, auth.ts, auth-routes.ts, auth-store.ts, pair-screen.tsx, browser-pair-handoff.ts, next.config.ts, the login-pairing spec, the prove skill), and its one new API route is a DELETE, which the cookie rule already covers. Verified: checks
…ss (#359) /maintain-prove-it pass on prove-learnharness. Outcome: updated, every change proved live. - Drifted step: since c3ff55f (upstream 0.7.0, #322) single-select options carry a letter badge, so web-teach.mjs and probes.mjs read "ABlue", never picked Blue, and timed out on head and base alike (receipts from #322, #349 and #302). New scripts/question-options.mjs reads each option's label without its badge, and the letter on its own. The options step still compares labels with ["Blue","Red"], the letters are diffed against base, and a missing option is its own failed step instead of a 60 s timeout. - Working command: web.md names the folder toggle's exact selector, since a prefix match also hits its wrapper elements (from the #343 prove). - SKILL.md "Could fool you" names the badge. Proved live: run-plan.sh head against base passed compare-web, compare-probes, compare-electron and compare-desktop. The budgets (CLS, axe, console) run again, the packaged Electron window passes all 14 web-teach steps, and break-it probes (a wrong label, cards without badges, two-letter badges) behave. Skill files only: no app code, no answer keys. Verified: prove (maintain pass, live)
…es it (#378) Every Nightly (self-hosted server) run since the upstream 0.7.0 merge (2f3520a, #322) failed at Desktop / Package (windows-x64), so no nightly release had shipped since 0.6.1-nightly.20261122.124. The installed Windows server answered 500 on every page with "Cannot find package '@shikijs/core' imported from ...\.next\node_modules\shiki-<hash>" (run 45019774528). The NSIS installer turns Next's .next/node_modules/shiki-<hash> link into a plain copy, and @shikijs/core is unreachable from that copy when it lives under node_modules/@streamdown/code/node_modules. #250 (aff528a) fixed this by moving the lock entries to the top level, but the upstream merge's lock regeneration nested them again. shiki 3.23.0 is now a direct dependency, so npm keeps shiki and @shikijs/* at the top level, with unchanged versions and integrity. tests/shiki-lock-layout.test.ts fails if they're ever nested under @streamdown/code again, and its message gives the Windows installer reason. Verified on Linux: npm ci, plugins:setup, build, build-server and the standalone server smoke pass, and the payload has shiki and @shikijs/* at the top level. The Windows installed-app smoke only runs in the Nightly workflow, so the next Nightly run is the real proof. Verified: checks
Brings upstream LearnHarness 0.7.0 (
amosblomqvist/learnharness@main, 117 commits) intomainthrough a real merge ofupstream-main, not a squash or rebase, so later syncs merge cleanly (docs/fork-workflow.md). The standing Sync PR is #320; it closes on its own oncemaincontains upstream.What changed and why
Upstream PRs included (from #320's body): amosblomqvist#450, amosblomqvist#528, amosblomqvist#591, amosblomqvist#592, amosblomqvist#629, amosblomqvist#632, amosblomqvist#692, amosblomqvist#701, amosblomqvist#725, amosblomqvist#745, amosblomqvist#784 and amosblomqvist#798.
Highlights:
The merge conflicted in 22 files. Every fork feature is kept: the T3 update flow parts 1 to 6 and
docs/specs/t3-style-updates.md, the desktop server list, the phone app, plugins and auth. Upstream's side is taken everywhere else.Judgment calls, each one: file, what each side did, what's kept and why.
electron/main.cjs,lh:update-install.ipcMain.onthat drops and logs untrusted senders.ipcMain.handlethat answers whether main took the install (the sidebar's Restarting state needs it) and already throws for an untrusted sender, with the sametrustedAppWindowsandtrustedSenderrule.tests/automatic-updates.test.ts. It covers a foreign or unregistered window, a missing frame, a navigated or bad URL, and a closed window revoking membership.electron/main.cjsandpreload.cjs, startup announcements.electron/startup-messages.cjsattaches to the first window of the launch, waits for its first paint, and gives up on any navigation.StartupMessagemount come in, but stay unwired. There are no preload methods and no IPC handlers, so the component never shows.electron/main.cjs,createWindow. The fork'sload()andwindowLoaders, which install recovery reloads through, are kept. Upstream'sbeforeLoad(win)hook is called just before the first load, as upstream does.electron/preload.cjs,components/sidebar.tsx, the preload-surface tests. The fork's bridge is kept: the T3 update methods, noonOpenSettings(removed in Use T3's native update dialogs from the menu in every window #316), no startup-message methods (see 2).StartupMessage.The plan layout:
src/core/plan-layout.ts,components/plan-layout.ts,components/plan-block.tsx.plan-block.tsx. The fork moved it tosrc/core/plan-layout.tsso the phone draws the same diagram. Upstream moved it tocomponents/plan-layout.tsand changed it to measure labels in the real font (LabelMeasure,chartMeasure,usePlanLayout).src/core/plan-layout.ts, because the phone imports it by path and core must not import components. It is upgraded to upstream's measured layout, with three fork changes:dagre-d3-esgraphlib subpath import;measuredefaulting tochartMeasurefor callers that can't measure (the phone);GRAPH_PAD, the glow constants,TEXT_CAP_SCALE,ARROW_HEAD) andlatestTree.components/plan-layout.tsre-exports it, so upstream's import path and tests are unchanged.plan-block.tsxis upstream's, importing and re-exporting those shared pieces instead of redefining them.PlanDiagramnow draws the layout's own lines (layout.linesandlineH).tests/plan-diagram-golden.test.tsx) is moved to the new API and recorded again, since upstream's layout change is intended.components/delete-session-dialog.tsx.DELETE_SESSION_COPY(also the phone's), plusbeginSessionDelete.copyprop, with the session copy built from the fork's shared strings.src/agent/tools/pdf-figure.ts(new upstream),jobs.ts,subagents/runner.ts.resolveSourcePath. That can't see the fork's uploaded attachments (attachment:<id>).resolveLearnerFilewith the chat's attachment lookup, as images already do. Only the opaque reference is shown, and attachment errors uselearnerFileErrorMessage.src/agent/tools/learner-image.ts. The fork's attachment-aware read and its error messages are kept, and the result goes through upstream's newlearnerImageFromBytes, which PDF figures share.src/agent/subagents/pdf-reader.ts. The fork's attachment resolution, with upstream's removal of the 14-turn cap (maxIterationsoptional; upstream c7dd027, "remove implicit background-agent turn caps").instrumentation.ts. Both: the fork's data lock and attachment sweep, then upstream's model catalog initialization.src/server/source-deletion.ts,components/delete-session-dialog.tsx,components/sidebar.tsx, upstream's folder Delete (completed in rounds 1 and 2).docs/specs/remote-safe-attachments.md).docs/specs/polish-first-load.mditem 4). Each session's reads are held while the request is in flight, and an open session that went is dropped and left withrouter.replace("/")(the newleaveDeletedSession).readStats,?view=stats) holds too, like the record and stream reads. The merge had moved it off the held path.package.jsonandpackage-lock.json.@earendil-works/pi-schema1.5.2 dependency is kept.npm installfrom upstream's lock and the mergedpackage.json..sdk/package.jsonfiles regenerate with no change, and no pluginpackage.jsonchanged.src/agent/models.ts, Anthropic message threads (owner decision, 2026-11-21).anthropicThreadSession), so the same key continues its thread and a rotated key starts a new one.models.getAuth()), and that exact key and those credential headers are what the request sends. A rotation or OAuth refresh between the fingerprint and the send can't put another key on the thread, and a per-requestx-api-keyoverride is part of the fingerprint (round 2).tests/provider-neutral-agents.test.tschecks:Tests that pin behaviour both sides touched.
tests/openrouter-free-models.test.ts: the fork's "is no longer available" wording, and the fork's priced retired models (src/server/retired-models.tskeepsopenai/gpt-3.5-turbo's price for usage already spent, though it never runs).huggingface:zai-org/GLM-4.5andopenrouter:meta-llama/llama-3.1-70b-instructare live), so a saved session on it runs again.jobs,extractionandsession-identity: upstream's newer usage and route assertions for Pi 1.5.2.side-chat: both sides' new tests.auth-keys.tsandplugin-background-tools.ts: upstream's wording.The client protocol guard (
tests/client-protocol.test.ts).optionOrdertoQuestionDataandQuestionAnswerData(src/core/question-core.ts), and shorten some model-facing descriptions.question-option-order-v1inserverInfo(),src/client-protocol/index.tsanddocs/specs/client-protocol.md, with the fingerprint recorded again.Import cycles through the settings dialog and the sidebar (verify round).
agent-section→prompt-segment-dialog→prompt-text→host-markdown) reaches the chat, which reaches the sidebar, which mounts Settings.SettingsDialogProviderbefore its module had initialized, so the first signed-in page returned 500.settings-dialog-context.ts:useSettingsDialog;sidebar-toggle.tsx:SidebarToggleanduseSidebar;time-ago.ts:timeAgo.tests/import-cycles.test.ts), and both re-export what moved.components/sidebar-folders.tsx, the root drop space (verify round). Upstream'saria-labelon a plain div is prohibited by ARIA (axearia-prohibited-attr, serious, also on upstream), soSidebarRootDrophas no name. Moving out of folders from the keyboard isn't in the sidebar on either side, and is left for later.Verified
CI was red at 48dc216. All three Standalone jobs failed in upstream's new
scripts/smoke-plan-labels.mjs. It polledGET /api/chatssigned out, and the fork has no localhost bypass (proxy.ts), so it got 401 until it timed out.Since round 1 it signs in the way
scripts/smoke-server.mjsdoes: a session in the server's own store, used as the poll's bearer and the browser's cookie.Run locally against
npm run buildwith Chrome, it passes all 79 checks.npx tsc --noEmit,npm run lint(no errors, one existing warning) andnode --test .github/scripts/*.test.cjs(50) pass.The 70 test files touching every conflicted area pass, one at a time under a memory cap: the eight conflicted test files, plus every test importing the desktop updater, preload, sidebar, plan, delete dialog, startup message, PDF reader, jobs, learner image, PDF figure, auth keys, plugin background tools, source deletion or instrumentation code.
The full root suite (468 files, 10 shards, two files at a time under a 3.5 GiB cap): 6,232 passing, 1 failing, 1 timed out.
tests/client-protocol.test.ts(15) passes when run alone.tests/claude-code-tool-bridge.test.ts"binds 127.0.0.1", which times out on this machine. It connects to the machine's first external IPv4 and expects a refusal. Here that's a Tailscale address (100.x), which drops the connection instead of refusing it. The bridge and its test are unchanged by this merge.node --test selfhost/tests/*.test.ts: 112 passing.The phone app (
apps/mobile, which the plan layout change touches):npm ci,npm run typecheck,npm run lintandnpm test(154) pass.deps:checkwas not run (the app'spackage.jsonis unchanged).Not driven in the real app.
Source
Upstream
amosblomqvist/learnharness0.7.0 (gh release view v0.7.0 -R amosblomqvist/learnharness), throughupstream-main. The Sync PR is #320.